<nav class="navbar navbar-expand-lg navbar-dark header" role="navigation">
    <div class="container">
        <a class="navbar-brand" href="/"><img title="${site.siteName!}" src="/images/logo.png" alt="${site.siteName!}" height="30" /></a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarText">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="/">首页</a>
                </li>
                <li class="nav-item active"><a class="nav-link" target="_blank" href="#">起名</a></li>
                <li class="nav-item active"><a class="nav-link" target="_blank" href="#">星座</a></li>
            </ul>
        </div>
        <div class="mr-3"><a class="text-light" href="/search/"><i class="fa fa-search"></i>搜索</a></div>
        [@fly_user method="userLogin"]
        [#if userLogin??]
        <div class="mr-3">
            <a class="text-light" href="/message/my/"><span class="badge badge-pill badge-light" id="newmsg">0</span> 消息</a>
        </div>
        [/#if]
        <div class="ts-user-nav">
            [#if userLogin??]
            <a style="color:#fff" href="#" class="ts-user-nav-dropdown">
                ${userLogin.nickname!} <img width="24" class="rounded-circle" alt="${userLogin.nickname!}" src="[#if userLogin.avatar??]${userLogin.avatar!}[#else]/images/avatar_boy.jpg[/#if]">
            </a>
            <div class="ts-dropdown dropdown-list pull-right">
                <ul class="ts-dropdown-list">
                    <li><a href="/user/my/">我的社区</a></li>
                    <li><a href="/user/my/setting">设置</a></li>
                    <li><a href="/user/logout">退出</a></li>
                </ul>
            </div>
            [#else]
            <a class="btn btn-info btn-sm" href="/user/login">登录</a>
            <a class="btn btn-success btn-sm" href="/register/phone">注册</a>
            [/#if]
        </div>
        [/@fly_user]
    </div>
</nav>
<div class="appnav mb-3">
    <div class="container">
        <a[#if active=="index"] class="on"[/#if] href="/">首页</a>
        <a[#if active=="group"] class="on"[/#if] href="/group/">小组</a>
        <a[#if active=="topic"] class="on"[/#if] href="/topic/">话题</a>
        <a[#if active=="search"] class="on"[/#if] href="/search/">搜索</a>
        <a[#if active=="people"] class="on"[/#if] href="/people/">用户</a>
    </div>
</div>